<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="domain.User"%>
<%@ page import="repository.UserDAO" import="java.sql.SQLException"
	import="java.sql.ResultSet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改个人信息</title>

<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/main1.css" rel="stylesheet">
</head>
<body>
	<jsp:include page="Header.jsp" />
	<%
		String Id = (String) session.getAttribute("loginUser");
		UserDAO userDao = new UserDAO();
		User user = new User();
		ResultSet rs = userDao.query(Id);
		try {
			while (rs.next()) {
				user.setUserId(rs.getString("用户Id"));
				user.setUserName(rs.getString("用户名"));
				user.setPwd(rs.getString("密码"));
				user.setIdentity(rs.getString("用户类型"));
				user.setPhnumber(rs.getString("电话号码"));
				user.setAdamic(rs.getString("学院名称"));
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
	%>
	<form class="form-horizontal" role="form" action="UserMod"
		method="post">
		<table
			class="table table-bordered table-hover table-condensed table-full-width">
			<tr>
				<td width="90" class="success">用户Id</td>
				<td width="150"><input class="form-control" name="ID"
					id="ds_password" type="text" placeholder="<%=user.getUserId()%>" />
				</td>
				<td width="90" class="success">用户名</td>
				<td width="150"><input class="form-control" name="name"
					id="ds_password" type="text" placeholder="<%=user.getUserName()%>" />
				</td>
			</tr>
			<tr>
				<td width="90" class="success">密码</td>
				<td width="150"><input class="form-control" name="pwd"
					id="ds_password" type="text" placeholder="<%=user.getPwd()%>" /></td>
				<td width="90" class="success">用户类型</td>
				<td width="150"><input class="form-control" name="identity"
					id="ds_password" type="text" placeholder="<%=user.getIdentity()%>" />
				</td>

			</tr>
			<tr>
				<td width="90" class="success">电话号码</td>
				<td width="150"><input class="form-control" name="number"
					id="ds_password" type="text" placeholder="<%=user.getPhnumber()%>" />
				</td>
				<td width="90" class="success">学院名称</td>
				<td width="150" colspan="3"><input class="form-control"
					name="acdem" id="ds_password" type="text"
					placeholder="<%=user.getAdamic()%>" /></td>
			</tr>
		</table>
		<button type="submit" class="btn">修改</button>
		<FONT face="宋体"> </FONT> <INPUT class="button_ok" type="button"
			onclick="history.go(-1)" value="返回" /> <span id="Label1"
			style="text-align: center"></span>
		<script type='text/javascript' src="js/jquery-1.9.1.min.js"></script>
		<script type='text/javascript' src="js/bootstrap.min.js"></script>
</body>
</html>